<template>
  <div class="app-container-flex">
    <NewFullScreen v-model="showDialog" :btn-list="btnList" :title="title">
      <div class="model-panel">
        <div class="model-panel-title">
          <p>{{ $t('basic_information') }}</p>
        </div>
        <div class="model-panel-body">
          <BasicInformation :info="infoList" />
        </div>
      </div>
    </NewFullScreen>
  </div>
</template>

<script setup name="sysPermissionDetails">
const emits = defineEmits()
const props = defineProps({
  visible: {
    type: Boolean,
    default: false,
  },
  tableRow: {
    type: Object,
    default: () => {
      return {}
    },
  },
})
const title = ref('系统权限模板详情')
const infoList = ref({
  data: props.tableRow,
  fieldList: [
    { label: '名称', value: 'name' },
    { label: '编码', value: 'code' },
    { label: '机构类型', value: 'typeValue' },
    { label: '创建人', value: 'createUserName' },
    { label: '创建时间', value: 'createTime' },
  ],
})
const btnList = ref([
  {
    label: '修改',
    event: update,
    show: true,
  },
])

const showDialog = computed({
  get() {
    return props.visible
  },
  set(val) {
    emits('update:visible', val)
  },
})

function update() {
  emits('callback', 'edit')
}
</script>

<style scoped></style>
